﻿// ***********************************************************************
// Provided for Informational Purposes Only
//
// Apache 2.0 License
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY 
// IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR 
// PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
//
// See the Apache Version 2.0 License for specific language governing
// permissions and limitations under the License.
// ***********************************************************************
// Assembly  : ContractMeow.Models
// File      : Token.cs
//
// ***********************************************************************
using System;


namespace ContractMeow.Models
{
	/// <summary>
	/// Class Token
	/// </summary>
	public sealed class Token
	{
		/// <summary>
		/// Gets or sets the id.
		/// </summary>
		/// <value>The id.</value>
		public long Id { get { return Key.GetHashCode(); } }
		//Temporarily removed because it was causing issues with json serialization
		//public IBuffer EncryptedKey { get; set; }
		/// <summary>
		/// Gets or sets the key.
		/// </summary>
		/// <value>The key.</value>
		public String Key { get; set; }
		/// <summary>
		/// Gets or sets the authenticated at.
		/// </summary>
		/// <value>The authenticated at.</value>
		public DateTimeOffset AuthenticatedAt { get; set; }
		/// <summary>
		/// Gets or sets the expires at.
		/// </summary>
		/// <value>The expires at.</value>
		public DateTimeOffset? ExpiresAt { get; set; }
	}
}